package com.ruoyi.orderview.utils;

import com.ruoyi.orderview.domain.ProductionParam;
import org.springframework.stereotype.Component;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
/**
 * Author 许家森
 * Date 2022/2/22
 * Email 3448324670@qq.com
 */
@Component
public class DateDispose {
    protected Date endtime;
    public ProductionParam DateDisposes(ProductionParam productionParam){
        SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd");
        Calendar gc = Calendar.getInstance();
        Date a=productionParam.getEndtime();
        gc.setTime(a);
        gc.add(Calendar.DAY_OF_MONTH, 1 );
        gc.add(Calendar.SECOND,-1);
        productionParam.setEndtime(gc.getTime());
        return productionParam;
    }
}
